﻿/*********************************************************************************/
/**    Sims3Pack Readme Generator                                               **/
/**    Copyright (C) 2012  Anja Knackstedt                                      **/
/**                                                                             **/
/**    This program is free software: you can redistribute it and/or modify     **/
/**    it under the terms of the GNU General Public License as published by     **/
/**    the Free Software Foundation, either version 3 of the License, or        **/
/**    (at your option) any later version.                                      **/
/**                                                                             **/
/**    This program is distributed in the hope that it will be useful,          **/
/**    but WITHOUT ANY WARRANTY; without even the implied warranty of           **/
/**    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            **/
/**    GNU General Public License for more details.                             **/
/**                                                                             **/
/**    You should have received a copy of the GNU General Public License        **/
/**    along with this program.  If not, see <http://www.gnu.org/licenses/>.    **/
/**                                                                             **/
/*********************************************************************************/




namespace Sims3PackReadmeGenerator.ContentDesciption
{
    /// <summary>
    /// coatset specific information
    /// </summary>
    class PackagedCoatsetDescription : PackagedFileDescription
    {
        #region properties

        public DescriptionItem Age { get; set; }
        public DescriptionItem Species { get; set; }

        #endregion

        #region constructor

        /// <summary>
        /// initializes the coatset description with a packaged file description
        /// </summary>
        /// <param name="packagedFileDescription"></param>
        public PackagedCoatsetDescription(PackagedFileDescription packagedFileDescription)
        {
            this.Name           = packagedFileDescription.Name;
            this.Length         = packagedFileDescription.Length;
            this.Offset         = packagedFileDescription.Offset;
            this.Guid           = packagedFileDescription.Guid;
            this.ContentType    = packagedFileDescription.ContentType;

            this.Age        = new DescriptionItem();
            this.Species    = new DescriptionItem();
        }

        #endregion

        #region methods

        /// <summary>
        /// retrieves fitting age string for specified language
        /// </summary>
        /// <param name="lang">language</param>
        /// <returns>age as string</returns>
        public string getAge(Languages lang)
        {
            string age = "";

            if (lang == Languages.de)
                age = this.Age.DE;
            else
                age = this.Age.EN;

            return age;
        }

        /// <summary>
        /// retrieves species string in specified language
        /// </summary>
        /// <param name="lang">language</param>
        /// <returns>species as string</returns>
        public string getSpecies(Languages lang)
        {
            string species = "";

            if (lang == Languages.de)
                species = this.Species.DE;
            else
                species = this.Species.EN;

            return species;
        }

        #endregion
    }
}
